package com.itheima.app.interceptor;

import com.itheima.domain.db.User;
//自定义threadLocal工具类操作user对象
public class UserHolder {

    private static final ThreadLocal<User> TL=new ThreadLocal<>();
    public static void set(User user){
        TL.set(user);
    }
    public static User get(){
        return TL.get();
    }
    public static void remove(){
        TL.remove();
    }
}
